package com.wyf.config;

import com.wyf.interceptors.JWTInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author wyf
 * @date 2022年07月17日 19:00
 */
@Configuration
public class WebConfig implements WebMvcConfigurer {
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new JWTInterceptor()).addPathPatterns("/*").excludePathPatterns("/user/*","/swagger-resources/**", "/webjars/**", "/v2/**", "/doc.html/**");
    }
}
